<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#div1{
				height: 100px;
				width: 100px;
				background-color: red;
			}
		</style>
	</head>
	<body>
		<div id="app">
			<div id="div1" v-if="flag"></div>
			<ul>
				<li v-for="(item,index) in list">
					{{index}}:{{item}}
				</li>
			</ul>
			
			
			<div id="myDiv"></div>
			<div v-bind:id="divID"></div>
			<button v-on:click="clickMe">按钮</button>
		</div>

	</body>
	
	<script>
	// function clickMe(){
	// 	alert("被惦记");
	// }
	
		var app = new Vue({
			el:'#app',
			data:{
				name:'张三',
				age:20,
				hobbies: '吃',
				html: '<h1>我是标题</h1>',
				flag: true,
				list: ['电脑','手机','平板'],
				divID: 'id123'
			},
			methods:{
				clickMe(){
					alert(this.age);
				}
			}
		});
	</script>
</html>
